<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="../static/css/reset.css">
    <link rel="stylesheet" type="text/css" href="../static/css/main.css">
    <script src="../static/js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
    <title>{{ data.news.title }}</title>
    <style type="text/css">
        .d1{
            margin: 0px auto;


        }
        .i1{
            width: 80px;
            height: 100px;

        }
        .i0{
            width: 60px;
            height: 60px;
        }
        .a1{
            position: fixed;
            top: 40%;
            left: 0px;
        }
        .a2{
            position: fixed;
            top: 40%;
            right: 0px;

        }
        .a3{
            position: fixed;
            top: 0px;
            right: 0px;

        }
        .pgc-img{
            text-align: center;

        }
        .pgc-img p{
            text-align: center;

        }
        .ql-align-center{
            text-align: center;
        }
    </style>
</head>
<body>
<div class="conter_con ">
    <a href="#" class="a1"><img src="../static/img/bz.png" alt="" class="i1"></a>
<div class="detail_con d1 " id="div1">
    <h3 id='h3' dataid={{ data.news.id }}>{{ data.news.title }}</h3>
    <div class="detail_about clearfix">
        <span class="time_souce fl">{{ data.news.create_time }} 来源: {{ data.news.source }} 浏览量：{{ data.news.clicks }}</span>
    </div>
    <div>{{ data.news.content | safe }}</div>


</div>
    <a href="/news" class="a3"><img src="../static/img/back.png" class="i0"></a>
    <a href="#" class="a2"><img src="../static/img/by.png" alt="" class="i1"></a>
</div>
</body>
﻿<script type="text/javascript">
    $('.a1').click(function(){
        var id=$('#h3').attr('dataid')

        var params = {
            'id':id,
            'move':'up'
        }
        $.get("/news/news_add", params, function (resp) {
            // 显示数据
            if(resp.errno=='1'){
                window.location.href='/news'
            }

            $('#div1').html('')
            var content=''


            content="<h3 id='h3' dataid="+resp.data.news.id+">"+resp.data.news.title+"</h3>\n" +
                "<div class='detail_about clearfix'>\n" +
                "<span class='time_souce fl'>"+resp.data.news.create_time+' 来源:'+resp.data.news.source+ ' 浏览量:'+resp.data.news.clicks+'</span>\n' +
                '</div>\n' +resp.data.news.content
            $('#div1').append(content)
        })

    });
    $('.a2').click(function(){

        var id=$('#h3').attr('dataid')
        {#id=parseInt(id)#}
        var params = {
            'id':id,
            'move':'down'
        }
        $.get("/news/news_add", params, function (resp) {
            // 显示数据
            if(resp.errno=='1'){
                window.location.href='/news'
            }
            $('#div1').html('')
            var content=''
            content="<h3 id='h3' dataid="+resp.data.news.id+">"+resp.data.news.title+"</h3>\n" +
                "<div class='detail_about clearfix'>\n" +
                "<span class='time_souce fl'>"+resp.data.news.create_time+' 来源:'+resp.data.news.source+' 浏览量:'+resp.data.news.clicks+'</span>\n' +
                '</div>\n' +resp.data.news.content
            $('#div1').append(content)
        })

    })
</script>
</html>